package jf.myfristservice;

import android.app.Activity;
import android.os.CountDownTimer;

public class MusicTimer extends CountDownTimer {

	private MainActivity oMainActivity;
	
	public MusicTimer(long millisInFuture, long countDownInterval) {
		super(millisInFuture, countDownInterval);

	}
	
	public MusicTimer(long millisInFuture, long countDownInterval, Activity oActivity) {
		super(millisInFuture, countDownInterval);
		
		oMainActivity	= (MainActivity)oActivity;
	}	
	@Override
	public void onFinish() {
		oMainActivity.endAPP();

	}

	@Override
	public void onTick(long millisUntilFinished) {
		oMainActivity.setTimerTextViewCountdown(millisUntilFinished);
	}

}
